package com.zjp.vo;

import com.zjp.pojo.InoculationSite;
import lombok.Data;

@Data
public class I_SiteAndArea extends InoculationSite {
    private String provinceid;

    private String province;

    private String cityid;

    private String city;

    private String area;

    private String pca;  // 包含省份、市和地区


    public void setArea(String area) {
        this.area = area;
        updatePca();
    }

    public void setCity(String city) {
        this.city = city;
        updatePca();
    }

    public void setProvince(String province) {
        this.province = province;
        updatePca();
    }

    private void updatePca() {
        this.pca = this.province+this.city+this.area;
    }


    @Override
    public String toString() {
        return "I_SiteAndArea{" +
                "provinceid='" + provinceid + '\'' +
                ", province='" + province + '\'' +
                ", cityid='" + cityid + '\'' +
                ", city='" + city + '\'' +
                ", area='" + area + '\'' +
                ", pca='" + pca + '\'' +
                '}';
    }
}